package ru.weho.bookitizer.editor;

import java.awt.*;
import java.awt.event.*;
import java.util.*;

import javax.swing.*;

public class EditorWindow extends JFrame
{
	private static final long serialVersionUID = 1876802758809622536L;

	public EditorWindow(String title) throws HeadlessException
	{
		super(title);

		Locale currentLocale = Locale.getDefault();
		ResourceBundle resourceBundle = ResourceBundle.getBundle("EditorWindow", currentLocale);

		// Construct menu
		JMenuBar menuBar = new JMenuBar();
		JMenu menu;
		JMenuItem item;

		// "File" menu
		menu = new JMenu(resourceBundle.getString("MENU_FILE"));
		menu.setMnemonic(KeyEvent.VK_F);
		menuBar.add(menu);

		item = new JMenuItem(resourceBundle.getString("MENU_FILE_NEW"));
		item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
		menu.add(item);

		this.setJMenuBar(menuBar);
	}
}
